package com.wgl.yygh.exception;

import com.wgl.yygh.result.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author wgl
 * @version 1.0.0
 * @ClassName GlobaExceptionHandler.java
 * @Description TODO
 * @createTime 2022年02月03日 21:15:00
 */
@RestControllerAdvice
public class GlobaExceptionHandler {


    @ExceptionHandler(Exception.class)
    public Result error(Exception e){
        e.printStackTrace();
        return Result.fail();
    }
}
